Component: TDataComboBox Version: 1.0 Author: Stefan Wloch Date: 19/8/97 Delphi 1, 2 & 3 I required a ComboBox that would associate a numeric value, not visible to the user, with each item in a combobox. I designed a component TDataComboBox inherited from TComboBox with a property 'DataItem' for each item in the combobox. To associate a numeric value with a TDataComboBox item, simply use the following syntax: var i: Integer; begin i:=DataComboBox1.Items.Add('Joe Bloggs'); DataComboBox1.DataItem[i]:=1234; //1234 is now a property of 'Joe Bloggs' DataComboBox item. end; The above two lines of code can be concatenated into one line of code: DataComboBox1.DataItem[DataComboBox1.Items.Add('Joe Bloggs')]:=1234; This component now enables me to add items to a combobox associating each item with a numeric value, particularly useful when you add items that have a numeric_key_value associated to them. ---------------------------------------------------------------- Installation Delphi 1 & 2 Backup your 'cmplib32.dcl' file as a precaution. Select 'Component', 'Install'. Select 'Add', 'Browse'. Select the directory containing the TDataComboBox files. Select 'DataComboBox.pas' and click OK on each box that appears. The TDataComboBox component will be added to the 'Standard' page of your component toolbar. If anything goes wrong, restore your backed-up cmplib32.dcl and try again after correcting any obvious problems. ----------------------------------------------------------------- Installation Delphi 3 Select 'Component', 'Install Packages...'. Select 'Delphi User's Components' from the design package list and Edit the package by pressing the Edit button. Package editor will be invoked. Now add DataComboBox.pas to the package and compile. The TDataComboBox component will be added to the 'Standard' page of your component toolbar. ----------------------------------------------------------------- Demo Application Demo.exe is a quick and simple demo of the TDataComboBox component. This component is FreeWare and may be used freely. Source code has been included. Enjoy, Stefan Wloch.